package iwb.utils.localpatition;

import araf.utils.enums.YNOption;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import iwb.close.isconfirmation.entity.CloseColumnConfig;
import iwb.close.processmanagement.entity.vo.IwbCloseProcessLogVO;
import iwb.close.processmanagement.entity.vo.IwbCloseProcessStepVO;
import iwb.close.processmanagement.exception.CloseBusinessException;
import iwb.database.domainmodel.IwbBase;
import iwb.database.domainmodel.enums.BaseConstant;
import iwb.database.service.IwbBaseMasService;
import iwb.utils.StringUtils;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.time.Duration;
import java.time.Instant;
import java.util.List;

@Component
@Data
@Slf4j
public class IwbBasePartition extends LocalPartition<IwbBase>{

    @Autowired
    IwbBaseMasService iwbBaseMasService;

    private IwbCloseProcessLogVO closeProcessLogVO;
    private String hostPrefix;
    private String headPrefix;


    @Override
    public void partitionExec(List<IwbBase> list) {
        list.forEach(iwbBase -> {
            Instant date11 = Instant.now();
//            setReconOtherOne(iwbBase);
            Instant date22 = Instant.now();
            Duration dur = Duration.between(date11, date22);
//            log.info(BaseConstant.LOG_INFO1.getValue(), "one ticket access mas time", dur.toMillis());
        });
    }




    @Autowired
    public void setIwbBaseMasService(IwbBaseMasService iwbBaseMasService){
        this.iwbBaseMasService = iwbBaseMasService;

    }
}
